home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / gnumake / gmake362.zoo / makefile.st < prev    next >
Makefile  |  1992-07-27  |  7KB  |  207 lines

  1. # Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
  2. # This file is part of GNU Make.
  3. # GNU Make is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. #
  8. # GNU Make is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GNU Make; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. #
  17. #    Makefile for GNU Make
  18. #
  19. CC = gcc
  20. CFLAGS = -z $(defines) -g -O -fomit-frame-pointer -fstrength-reduce
  21. LDFLAGS = -G
  22.  
  23. # Define these for your system as follows:
  24. #     -DUSG            System V
  25. #    -DUSGr3            SVR3 (also define USG)
  26. #    -DHPUX            HP-UX (also define USG and USGr3 appropriately)
  27. #    -DHAVE_SYS_WAIT        USG, but have <sys/wait.h> and wait3
  28. #    -DHAVE_SIGLIST        USG, but have sys_siglist
  29. #    -DHAVE_DUP2        USG and not USGr3, but have dup2
  30. #    -DNO_MINUS_C_MINUS_O    cc can't handle "cc -c foo.c -o foo.o"
  31. #    -DPOSIX            A 1003.1 system (or trying to be)
  32. #    -DNO_ARCHIVES        To disable `ar' archive support.
  33. #    -DNO_FLOAT        To avoid using floating-point numbers.
  34. #    -DENUM_BITFIELDS    If the compiler isn't GCC but groks enum foo:2.
  35. #                Some compilers apparently accept this
  36. #                without complaint but produce losing code,
  37. #                so beware.
  38. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
  39. defines = -DNO_FLOAT
  40.  
  41. # Define these for your system as follows:
  42. #    -DUMAX        Encore UMAX
  43. #    -DUMAX_43    Encore UMAX 4.3 (also define UMAX)
  44. #    -DNO_LDAV    Disable load-average checking.
  45. # To read /dev/kmem (most Unix systems), define these if different from the
  46. # given defaults:
  47. #    -DKERNEL_FILE_NAME=\"/vmunix\"
  48. #    -DLDAV_SYMBOL=\"_avenrun\"
  49. #    -DLDAV_CVT="(double) load"
  50. # Define:
  51. #    -DNLIST_NAME_UNION    If `struct nlist' has a n_un member.
  52. #    -DNLIST_NAME_ARRAY    If `n_name' is an array.
  53. LOAD_AVG = -DNO_LDAV
  54.  
  55. # If you don't want archive support, comment these out.
  56. ARCHIVES = arscan.o ar.o
  57. ARCHIVES_SRC = arscan.c ar.c
  58.  
  59. # If your system needs extra libraries loaded in, define them here.
  60. # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
  61. # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  62. # alloca.c (below) instead on those machines.  SGI Irix needs -lmld
  63. # for nlist.
  64. LOADLIBES = -liio
  65.  
  66. # If your system doesn't have alloca, or the one provided is bad,
  67. # get it from the Emacs distribution and define these.
  68. #ALLOCA = alloca.o
  69. #ALLOCASRC = alloca.c
  70.  
  71. # If there are remote execution facilities defined,
  72. # enable them with switches here (see remote-*.c).
  73. REMOTE =
  74.  
  75. # Any extra object files your system needs.
  76. extras =
  77.  
  78. # Comment this out if POSIX.2 glob is installed on your system
  79. # (it's in the GNU C Library, so if you're using that, this is
  80. # not needed at all.)
  81. globdep = glob/glob.olb
  82.  
  83. # Library containing POSIX.2 `glob' function.
  84. # Comment this line out if it's in the C library (which is the case if you
  85. # are using the GNU C Library), or change it to the appropriate file name
  86. # or -l switch.
  87. globlib = $(globdep)
  88.  
  89. # Name under which to install GNU make.
  90. instname = make
  91. # Directory to install `make' in.
  92. bindir = $(prefix)/usr/local/bin
  93. # Directory to install the man page in.
  94. mandir = $(prefix)/usr/local/man/manl
  95. # Number to put on the man page filename.
  96. manext = l
  97.  
  98. # Install make setgid to this group so it can read /dev/kmem.
  99. group = kmem
  100.  
  101. objs = commands.o job.o dir.o file.o load.o misc.o main.o read.o \
  102.        remake.o remote.o rule.o implicit.o default.o variable.o expand.o \
  103.        function.o vpath.o version.o $(ARCHIVES) $(ALLOCA) $(extras)
  104. srcs = commands.c job.c dir.c file.c load.c misc.c main.c read.c \
  105.        remake.c remote.c rule.c implicit.c default.c variable.c expand.c \
  106.        function.c vpath.c version.c $(ALLOCASRC) $(ARCHIVES_SRC) \
  107.        commands.h dep.h file.h job.h make.h rule.h variable.h
  108.  
  109.  
  110. .SUFFIXES:
  111. .SUFFIXES: .o .c .h .ps .dvi .texinfo
  112.  
  113. .PHONY: all doc
  114. all: make.ttp
  115. doc: make.info make.dvi
  116.  
  117.  
  118. # Take your pick.
  119. #makeinfo = emacs -batch make.texinfo -f texinfo-format-buffer -f save-buffer
  120. makeinfo = makeinfo make.texinfo
  121.  
  122. make.info: make.texinfo
  123.     $(makeinfo)
  124.  
  125.  
  126. make.dvi: make.texinfo
  127.     -tex make.texinfo
  128.     texindex make.cp make.fn make.ky make.pg make.tp make.vr
  129.     -tex make.texinfo
  130.  
  131. make.ps: make.dvi
  132.     dvi2ps make.dvi > make.ps
  133.  
  134. make.ttp: $(objs) $(globdep)
  135.     $(CC) $(LDFLAGS) $(objs) $(globlib) $(LOADLIBES) -o make.new
  136.     mv -f make.new $@
  137.  
  138. make.sym: make.ttp
  139.     sym-ld.ttp -o make.sym $(GNULIB)/crt0.o $(objs) $(globlib) $(LOADLIBES) -lgnu
  140.  
  141. load.o: load.c
  142.     $(CC) $(CFLAGS) $(LOAD_AVG) -c load.c
  143. remote.o: remote.c
  144.     $(CC) $(CFLAGS) $(REMOTE) -c remote.c
  145.  
  146. # For some losing Unix makes.
  147. MAKE = make
  148.  
  149. glob/glob.olb: #force
  150.     cd glob; $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) -I..' libglob.a
  151. force:
  152.  
  153. TAGS: $(srcs)
  154.     etags -tw $(srcs)
  155. tags: $(srcs)
  156.     ctags -tw $(srcs)
  157.  
  158. .PHONY: install
  159. install: $(bindir)/$(instname) $(mandir)/$(instname).$(manext)
  160.  
  161. $(bindir)/$(instname): make
  162.     cp make $@.new
  163. # These are necessary for load-average checking to work on most Unix machines.
  164.     chgrp $(group) $@.new
  165.     chmod g+s $@.new
  166.     mv $@.new $@
  167.  
  168. $(mandir)/$(instname).$(manext): make.man
  169.     cp make.man $@
  170.  
  171. .PHONY: clean realclean
  172. clean: glob-clean
  173.     -rm -f make *.o core
  174. realclean: clean glob-realclean
  175.     -rm -f TAGS tags make.info* make-* make.dvi *~
  176.     -rm -f make.?? make.??s make.log make.toc make.*aux
  177.  
  178. .PHONY: glob-clean glob-realclean
  179. glob-clean glob-realclean:
  180.     cd glob; $(MAKE) $@
  181.  
  182. # Automatically generated dependencies will be put at the end of the file.
  183.  
  184. # Automatically generated dependencies.
  185. commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h 
  186. job.o : job.c make.h commands.h job.h file.h variable.h 
  187. dir.o : dir.c make.h 
  188. file.o : file.c make.h commands.h dep.h file.h variable.h 
  189. load.o : load.c make.h commands.h job.h 
  190. misc.o : misc.c make.h dep.h 
  191. main.o : main.c make.h commands.h dep.h file.h variable.h job.h 
  192. read.o : read.c make.h commands.h dep.h file.h variable.h 
  193. remake.o : remake.c make.h commands.h job.h dep.h file.h 
  194. remote.o : remote.c remote-stub.c make.h commands.h 
  195. rule.o : rule.c make.h commands.h dep.h file.h variable.h rule.h 
  196. implicit.o : implicit.c make.h rule.h dep.h file.h 
  197. default.o : default.c make.h rule.h dep.h file.h commands.h variable.h 
  198. variable.o : variable.c make.h commands.h variable.h dep.h file.h 
  199. expand.o : expand.c make.h commands.h file.h variable.h 
  200. function.o : function.c make.h variable.h dep.h commands.h job.h 
  201. vpath.o : vpath.c make.h file.h variable.h 
  202. version.o : version.c 
  203. arscan.o : arscan.c 
  204. ar.o : ar.c make.h file.h 
  205.